// /main/system/role  -> type === 2 对应menu
export function pathMapMenu(userMenu,currentPath) {
  for (const menu of userMenu) {
    if (menu.type === 1) {
      const findMenu = pathMapMenu(menu.children ?? [], currentPath)
      if (findMenu) {
        return findMenu
      }
    }else if(menu.type === 2 && menu.url === currentPath) {
      return menu
    }
  }
}
